x86 xsave: supports xsave (CPUID:0xD) enumeration for all sub-leaves.
authorKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:39:42 +0000 (08:39 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:39:42 +0000 (08:39 +0000)
commit25121ee23d3fef8cead4e56ece10f8e1ce7cbf09
tree68f115d9e7f4c2ed018031b8e364363026fb8499
parent96727f714845b5c2ea034860f3773e46612adc39
x86 xsave: supports xsave (CPUID:0xD) enumeration for all sub-leaves.

In specific, it fixes the following issues:

1. The sub-leaves of CPUID:0x0000000D aren't contiguous. Hypervisor
shouldn't use register values to stop the enumeration. This patch
moves checking on XSAVE sub-leaves out of if-else statement. It also
bumps up sub-leaves to 63.
2. It creates a common function for xsave.
3. The main leaf 0 of CPUID:0x0000000D in current Xen is broken,
especially ECX and EBX registers. This patch cleans it up.
4. It adds support to detects EBX value of CPUID:0x0000000D main leaf
0 on-the-fly.

Signed-off-by: Wei Huang2 <wei.huang2@amd.com>
tools/libxc/xc_cpuid_x86.c
xen/arch/x86/hvm/hvm.c